package bean;

import java.util.Date;

/**
 * @Author 王志康
 * @Date 2021/8/30 10:47
 * @Version 1.0.0
 */
public class GeneralBean extends ProductBean {
    /**
     * dateOfManufacture 生产日期
     * qualityGuaranteePeriod 保质期
     * productArea 产地
     */
    private Date dateOfManufacture;
    private String qualityGuaranteePeriod;
    private String productArea;

    public GeneralBean(int productId, String productName, double productPrice, boolean onTheShelf,
                       Date dateOfManufacture, String qualityGuaranteePeriod, String productArea) {
        super(productId, productName, productPrice, onTheShelf);
        this.dateOfManufacture = dateOfManufacture;
        this.qualityGuaranteePeriod = qualityGuaranteePeriod;
        this.productArea = productArea;
    }

    public Date getDateOfManufacture() {
        return dateOfManufacture;
    }

    public void setDateOfManufacture(Date dateOfManufacture) {
        this.dateOfManufacture = dateOfManufacture;
    }

    public String getQualityGuaranteePeriod() {
        return qualityGuaranteePeriod;
    }

    public void setQualityGuaranteePeriod(String qualityGuaranteePeriod) {
        this.qualityGuaranteePeriod = qualityGuaranteePeriod;
    }

    public String getProductArea() {
        return productArea;
    }

    public void setProductArea(String productArea) {
        this.productArea = productArea;
    }


    @Override
    public String toString() {
        return "产品编号:" + productId +
                " 产品名称: " + productName +
                " 产品价格:" + productPrice +
                " 产地:" + productArea +
                " 生产日期:" + dateOfManufacture +
                " 保质期:" + qualityGuaranteePeriod +
                " 是否上架:" + onTheShelf;
    }
}
